package com.android.qjpmc.bean;

public class AlarmRecordItemBean {

    static final int ALARM_VALUE_RESET = 0;
    static final int ALARM_VALUE_BYND_UP_LMT = 1;
    static final int ALARM_VALUE_BYND_BTM_LMT = 2;
    public String m_name;
    public int m_value; //0.复归；1.越上限；2.越下限
    public String m_time;
    public int m_id;//事件ID
    public String m_value_text = null;
    public String m_fault_value;


    //胖胖加的
    public String alarm_content;
    public int alarm_level;
    public String alarm_status;
    public String alarm_time;
    public String company_code;
    public String company_name;
    public String device_code;
    public String device_name;
    public String pid;
    public String proc_plan;

    public AlarmRecordItemBean(int id, String time, String name, int value )
    {
        this.m_id = id;
        this.m_time = time;
        this.m_name = name;
        this.m_value = value;
    }
    public AlarmRecordItemBean()
    {

    }
    public void SetValue(int value)
    {
        m_value = value;
        m_value_text = GetValueText();
    }
    public String GetValueText()
    {
        switch (m_value)
        {
            case ALARM_VALUE_RESET: {
                return "复归";
            }
            case ALARM_VALUE_BYND_UP_LMT:
            {
                return "越上限";
            }
            case ALARM_VALUE_BYND_BTM_LMT:
            {
                return "越下限";
            }
            default:
            {
                return "未知";
            }
        }
    }
}
